﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.BehaviorTree;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.Logic.POI;
using Styx.WoWInternals.WoWObjects;

namespace Healz.Druid.Spells
{
    class Rejuvenation
    {
        public const string SpellName = "Rejuvenation";

        public static bool Pulse(WoWPlayer Player)
        {
            // Checks
            if (Player.HealthPercent > Main.Settings.Rejuvenation_Percent) return false;
            Utils.WriteDebug("Past Health Check");
            if (Player.Distance > SpellManager.Spells[SpellName].MaxRange) return false;
            Utils.WriteDebug("Past Distance Check");
            if (!SpellManager.Spells[SpellName].CanCast) return false;
            Utils.WriteDebug("Past CanCast Check");
            if (Player.HasAura(SpellName)) return false;
            Utils.WriteDebug("Past HasAura Check");


            Utils.WriteCast(SpellName, Player);
            SpellManager.Cast(SpellName, Player);

            return true;
        }
    }
}
